home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Game-Power
/
Amiga Game-Power.iso
/
anwendungen
/
mackie
/
uedit
/
config!m
< prev
next >
Wrap
Text File
|
1994-05-20
|
70KB
|
1,995 lines
======= MISCELLANEOUS CMDS =======
Set max number of files can load for normal editing (1-100, usually 20)
<altCtl-f1:
.. **** deactivate next 2 lines, if registered user.
.. alertUser("Must have full Uedit to increase maximum files.")
.. returnFalse
putMsg("Input max # documents allowed (1-100)")
if (inputNum(n54)) setMaxFiles(n54) >
Set start of hilite region
<shft-buttonDown: equateLoc(curFile,sHilite,mouseLoc) refreshDisplay >
Set end of hilite region
<alt-buttonDown: equateLoc(curFile,eHilite,mouseLoc) refreshDisplay >
Mark region clicked with mouse
<virtual-buttonDown:
equateLoc(curFile,atCursor,mouseLoc)
equateLoc(curFile,eInvert,atCursor)
equateLoc(curFile,sInvert,atCursor)
if (eqNum(curFile,38)) equateLoc(buf38,eHilite,sHilite)
while (mouseDown) inputKey(n54)
if (is(curFile,eFile)) returnFalse
if (is(curFile,whiteSpace)) returnFalse
while (not is(curFile,whiteSpace)) { .. find start non-white
moveCursor(curFile,sChar)
if (is(curFile,sFile)) goto label(1)
}
label(1)
if (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
equateLoc(curFile,sInvert,atCursor) .. sinvert = start non-white
while (not is(curFile,whiteSpace)) { .. find end non-white
moveCursor(curFile,eChar)
if (is(curFile,eFile)) goto label(2)
}
label(2)
equateLoc(curFile,eInvert,atCursor) .. einvert = end non-white
if (eqNum(curFile,38)) { .. in directory buffer 38
equateLoc(curFile,sHilite,sInvert)
equateLoc(curFile,eHilite,eInvert)
equateLoc(curFile,sInvert,eInvert)
moveCursor(curFile,sHilite)
}
refreshDisplay
>
Load File or select Directory that is CTRL-clicked.
<ctl-buttonDown:
equateNum(n7,curFile)
if (not runKey(virtual-buttonDown)) {
runKey(virtual-buttonUp)
return
}
if (not eqNum(curFile,38)) {
if (geLoc(curFile,sInvert,eInvert)) return .. no rgn
moveCursor(curFile,sChar)
if (not is(curFile,"/")) if (not is(curFile,":")) {
freeBuf(buf54)
moveCursor(curFile,sInvert)
while (not eqLoc(curFile,atCursor,eInvert)) {
if (is(curFile,":")) goto label(99)
moveCursor(curFile,eChar)
}
insertRgn(buf54,sFile,buf38,hilite)
label(99)
insertRgn(buf54,eFile,curFile,invert)
loadFile(buf54)
return
}
moveCursor(curFile,eInvert)
freeBuf(buf53)
insertRgn(buf53,eFile,curFile,invert)
runKey(virtual-7) .. add dir to buf38
}
runKey(virtual-9) .. show dir msg
return
>
Handle buf38 directory traffic
<virtual-buttonUp:
runKey(virtual-8) .. load in dir defalts if not loaded
equateLoc(buf38,mouseLoc,atCursor)
equateNum(n8,0)
if (not eqNum(curFile,38)) if (not gotoSplit(buf38)) {
if (not splitWindow(buf38,7)) {
putMsg("Close a split window so can let you select Directory")
return
}
equateNum(n8,1) .. had to make split window
}
updateDisplay
label(98)
equateLoc(buf38,mouseLoc,sFile)
putMsg(
"Ctrl-mouse=SelectDir. F1=Edit. F2=DirList. F3=Save. F4=ChgDir. F5=CD.")
while (mouseDown) inputKey(n54)
getKeyVal(macroNum,inputChar)
if (eqNum(macroNum,normal-buttonDown)) { .. done bring down window
gotoSplit(buf[n7])
if (eqNum(n8,1)) splitWindow(buf38,0) .. close it if made it
runKey(virtual-9)
return
}
if (eqNum(macroNum,normal-f1)) { .. edit buf38
putMsg("Press left-Amiga-0 to elim split window.")
return
}
if (eqNum(macroNum,ctl-buttonDown)) {
runkey(virtual-buttonDown)
refreshDisplay
runKey(virtual-9)
delay(3)
}
if (eqNum(macroNum,normal-f2)) { .. get dir list
gotoSplit(buf[n7])
if (eqNum(n8,1)) splitWindow(buf38,0) .. close it if made it
if (newFile) {
setFileName(curFile,"DirList")
clearRgn(curFile,all)
insertRgn(curFile,atCursor,buf38,hilite)
insertChar(curFile,eLine)
equateLoc(curFile,sPage,sFile)
updateDisplay
freeBuf(buf54)
insertRgn(buf54,eFile,"dir ",all)
insertRgn(buf54,eFile,buf38,hilite)
execute(curFile,buf54)
.. massage dir list
getSearch(buf49)
setSearch(" (dir)")
moveCursor(curFile,sFile)
while (search(curFile,locA,locB,1)) {
clearRgn(curFile,loc)
insertChar(curFile,"/")
moveCursor(curFile,sLine)
moveCursor(curFile,eWord)
moveCursor(curFile,sWord)
insertRgn(curFile,atCursor,buf38,hilite)
}
setSearch(buf49) .. restore search string
moveCursor(curFile,sFile)
flipFlag(curFile,changed)
putMsg("Ctl-click dirnames to add, filenames to load.")
return
} else putMsg("Can't open file buf for dir list")
}
if (eqNum(macroNum,normal-f3)) saveFile(buf38)
if (eqNum(macroNum,normal-f4)) { .. change dir
if (gtLoc(buf38,eHilite,sHilite)) {
freeBuf(buf54)
insertRgn(buf54,eFile,buf38,hilite)
changeDir(buf54)
goto label(0)
}
}
if (eqNum(macroNum,normal-f5)) { .. get CD
label(0)
freeBuf(buf53)
execute(buf53,"CD")
freeBuf(buf54)
insertRgn(buf54,eFile,"CD = ",all)
insertRgn(buf54,eFile,buf53,line)
putMsg(buf54)
delay(5)
}
goto label(98)
>
Click or drag mouse, put word/phrase into index in buf41. (Ctl-w to see.)
<shftAlt-buttonDown:
equateLoc(curFile,atCursor,mouseLoc)
moveCursor(curFile,eWord)
equateLoc(curFile,eInvert,atCursor)
moveCursor(curFile,sWord)
equateLoc(curFile,sInvert,atCursor)
refreshDisplay>
Click or drag mouse, put word/phrase into index in buf41. (Ctl-w to see.)
<shftAlt-buttonUp:
equateLoc(curFile,atCursor,mouseLoc)
moveCursor(curFile,eWord)
equateLoc(curFile,eInvert,atCursor)
if (geLoc(curFile,sInvert,eInvert)) returnFalse
moveCursor(curFile,sInvert)
if (is(curFile,upperCase)) equateNum(n0,1)
else equateNum(n0,0)
toLower(curFile)
copyChar(curFile,n54)
if (eqNum(n0,1)) toUpper(curFile)
if (isEmpty(buf41)) insertChar(buf41,eLine)
moveCursor(buf41,sFile)
equateLoc(buf41,sPage,atCursor)
label(1)
if (is(buf41,upperCase)) equateNum(n0,1)
else equateNum(n0,0)
toLower(buf41)
copyChar(buf41,n53)
if (eqNum(n0,1)) toUpper(buf41)
if (gtNum(n54,n53)) {
moveCursor(buf41,downLine)
if (not is(buf41,eFile)) goto label(1)
}
insertRgn(buf41,atCursor,curFile,invert)
insertChar(buf41,eLine)
>
Set start of invert region
<shftCtl-buttonDown: equateLoc(curFile,sInvert,mouseLoc) refreshDisplay >
Set end of invert region
<altCtl-buttonDown: equateLoc(curFile,eInvert,mouseLoc) refreshDisplay >
Drag mouse and create hilite region
<shftAltCtl-buttonDown:
equateLoc(curFile,locA,mouseLoc)
while (trackMouse) nothing
if (gtLoc(curFile,locA,mouseLoc))
{ equateLoc(curFile,sHilite,mouseLoc) equateLoc(curFile,eHilite,locA) }
else
{ equateLoc(curFile,eHilite,mouseLoc) equateLoc(curFile,sHilite,locA) }
refreshDisplay >
Adjust active split window size with mouse
<lAmiga-=:
getSplitLines(n53,n52) .. see if is upper split
if (eqNum(n53,0)) {
putMsg("Adjust lower splits, not top one")
returnFalse .. don't size main window
}
putMsg("Press button, move mouse to set split window size")
getkey(N54)
if (not mouseDown) return
trackMouse
mouseXY(n4,n5)
equateNum(n54,curFile)
label(0)
if (inputWaiting) { putMsg(" ") return }
trackMouse
mouseXY(n2,n3)
getSplitLines(n53,n52) .. get start & stop
sub(n52,n52,n53)
if (gtNum(n5,n3)) {
if (gtNum(n53,3)) incNum(n52)
else goto label(0)
}
else if (gtNum(n3,n5)) decNum(n52)
else goto label(0)
if (not eqNum(n5,n3)) {
splitWindow(curFile,0)
if (gtNum(2,n52)) equateNum(n52,2)
splitWindow(buf[n54],n52)
updateDisplay
equateNum(n5,n3)
}
goto label(0)
>
Scroll up 1 line
<normal-upArrow: vScroll(-1) >
Scroll down 1 line
<normal-downArrow: vScroll(1)>
Scroll right 1 char
<normal-leftArrow: hScroll(1) >
Scroll left 1 char
<normal-rightArrow: hScroll(-1) >
Scroll up 11 lines
<shft-upArrow: vScroll(-11) >
Scroll down 11 lines
<shft-downArrow: vScroll(11) >
Scroll right 10 chars
<shft-leftArrow: hScroll(10) >
Scroll left 10 chars
<shft-rightArrow: hScroll(-10) >
Scroll to start of page
<alt-upArrow: vScroll(sPage) >
Scroll to bottom of page
<alt-downArrow: vScroll(ePage) >
Scroll right 20 chars
<alt-leftArrow: hScroll(20) >
Scroll left 20 chars
<alt-rightArrow: hScroll(-20) >
Scroll to start of file
<ctl-upArrow: vScroll(sFile) >
Scroll to end of file
<ctl-downArrow: vScroll(eFile) >
Scroll to end of line
<ctl-leftArrow: getLocal(curFile,n54,lineLength)
hScroll(n54) >
Scroll to start of line
<ctl-rightArrow: while (hScroll(-1)) nothing >
Load and show help file - press again to release help
<normal-help: if (not isEmpty(buf42)) {
equateNum(n54,curFile)
if (eqNum(n54,42)) freeBuf(buf42)
else editBuf(buf42)
} else {
insertFile(buf42,sFile,"Help!")
if (isEmpty(buf42)) {
freeBuf(buf42)
insertFile(buf42,sFile,"S:Help!")
}
if (not isEmpty(buf42)) {
editBuf(buf42)
flipFlag(buf42,readOnly)
} else putMsg("Can't find S:Help! file.")
} >
Used with show vals, shft-Help
<virtual-help: if (eqNum(n50,1)) {
fileSize(buf53,n53)
while (decNum(n53)) clearChar(buf54)
equateNum(n50,0)
} else equateNum(n50,1)
insertRgn(buf54,atCursor,buf53,all)
search(buf54,loca,locb,1)
moveCursor(buf54,eChar)
freeBuf(buf53)>
Show current values of line-length, lines/page, tab-table #, colors, etc
<shft-help: freeBuf(buf54)
getSearch(buf52)
setSearch(":")
putMsg(" ")
insertRgn(buf54,atCursor,
"
Serial number: Left margin :
Buffer : Top margin :
Changed : Bottom margin :
Size : Tab table :
Max files : Printer select :
Split size : Speak mode :
Idle timer : \"\" speed :
Colors : \"\" pitch :
Scroll type : Search wildcard :
Hide display : \"\" multiWild :
End-of-line : \"\" allBut :
PM terminator: \"\" eitherOr :
Line length : \"\" singleWhite :
Lines/page : \"\" multiWhite :
",all)
do (n54,1,50) insertChar(buf54,eLine)
moveCursor(buf54,sFile)
copyChar(buf54,n52)
equateNum(n51,curFile)
freeBuf(buf53)
insertRgn(buf53,sFile,"Values for buffer ",all)
toWord(buf53,n51)
setFileName(buf54,buf53)
equateNum(n50,1)
search(buf54,loca,locb,1)
moveCursor(buf54,eChar)
freeBuf(buf53)
getSerialNum(n54)
toWord(buf53,n54)
runkey(virtual-help)
getLocal(curFile,n54,leftMargin)
toWord(buf53,n54)
runkey(virtual-help)
toWord(buf53,n51)
runkey(virtual-help)
getLocal(curFile,n54,topMargin)
toWord(buf53,n54)
runkey(virtual-help)
if (getFlag(curFile,changed)) insertChar(buf53,"Y")
else insertChar(buf53,"n")
runkey(virtual-help)
getLocal(curFile,n54,bottomMargin)
toWord(buf53,n54)
runkey(virtual-help)
fileSize(curFile,n54)
toWord(buf53,n54)
runkey(virtual-help)
getLocal(curFile,n54,tabTable)
toWord(buf53,n54)
runkey(virtual-help)
getMaxFiles(n54)
toWord(buf53,n54)
runkey(virtual-help)
toWord(buf53,prefPrint)
runkey(virtual-help)
toWord(buf53,splitSize)
runkey(virtual-help)
insertChar(buf53,speakMode)
runkey(virtual-help)
toWord(buf53,idleTime)
runkey(virtual-help)
toWord(buf53,speakSpeed)
runkey(virtual-help)
getWBColors(n0,n1,n2,n3)
toWord(buf53,n0)
toWord(buf53,n1)
toWord(buf53,n2)
toWord(buf53,n3)
runkey(virtual-help)
toWord(buf53,speakPitch)
runKey(virtual-help)
toWord(buf53,scrollType)
runkey(virtual-help)
insertChar(buf53,wildCard)
runKey(virtual-help)
if (getFlag(curFile,hideDisplay)) insertChar(buf53,"Y")
else insertChar(buf53,"n")
runkey(virtual-help)
insertChar(buf53,multiWild)
runkey(virtual-help)
toWord(buf53,n52) .. eol, copied it above
runkey(virtual-help)
insertChar(buf53,allBut)
runkey(virtual-help)
toWord(buf53,pmESC)
runkey(virtual-help)
insertChar(buf53,eitherOr)
runkey(virtual-help)
getLocal(curFile,n54,lineLength)
toWord(buf53,n54)
runkey(virtual-help)
add(n54,singleWhite,"0")
insertChar(buf53,n54)
runkey(virtual-help)
getLocal(curFile,n54,pageLines)
toWord(buf53,n54)
runkey(virtual-help)
add(n54,multiWhite,"0")
insertChar(buf53,n54)
runKey(virtual-help)
moveCursor(buf54,eFile)
equateLoc(buf54,sPage,sFile)
editBuf(buf54)
updateDisplay
setSearch(buf52)
putMsg("Any key to continue")
getKey(n54)
putMsg(" ")
editBuf(buf[n51])
freeBuf(buf54) >
Rotate 4 Workbench colors in Uedit
<alt-help: toggle(color) >
Start this Key-Help mode - press Amiga-ESC to leave this Key-Help mode
<ctl-help: flipFlag(curFile,teachKeys) >
Refresh window (or screen in interlace), including title bar
<shftCtl-help: refreshDisplay >
Rebuild the menus by running the startup command
<shftAltCtl-Help: runKey(startup) >
Close file. If changed, ask "Save changes?" If no files, ask "Really quit?"
<normal-closeBox:
if (getFlag(curfile,changed)) {
if (askYesNo("Save changes?"))
if (not saveFile(curFile)) return
}
freeBuf(curFile)
if (isEmpty(curFile)) {
equateNum(n1,0)
getMaxFiles(n2)
decNum(n2)
do (n0,0,n2) if (not isEmpty(buf[n0])) equatenum(n1,1)
if (eqNum(n1,0))
if (askYesNo("Really quit?")) quit(0)
} >
Switch to next document
<normal-gadget1: toggle(curFile) >
Switch to previous document
<normal-gadget2: runKey(shft-f1) >
Scroll display down
<normal-gadget3: while (mouseDown) { vScroll(1) updateDisplay } >
Scroll display up
<normal-gadget4: while (mouseDown) { vScroll(-1) updateDisplay } >
Switch to next file
<normal-f1: toggle(curFile) >
Switch to previous file
<shft-f1: getMaxFiles(n53)
if (geNum(1,n53)) { editBuf(buf0) returnFalse }
decNum(n53)
equateNum(n54,curFile)
while (nothing) {
if (gtNum(n54,n53)) equateNum(n54,n53)
decNum(n54)
if (gtNum(0,n54)) equateNum(n54,n53)
if (getFileName(buf54,buf[n54])) {
editBuf(buf[n54])
returnTrue
}
} >
Load a file
<alt-f1: putMsg("Input new filename:")
freeBuf(buf43)
if (inputString(buf43)) loadFile(buf43) >
Open new "Noname" file
<ctl-f1: newFile >
Insert file at cursor
<shftAlt-f1: putMsg("Input filename to insert:")
freeBuf(buf43)
if (inputString(buf43)) insertFile(curFile,atCursor,buf43) >
Restore current file to original
<shftCtl-f1: if (not askYesNo("Restore file to original?"))
returnFalse
if (getFileName(buf43,curFile))
{ freeBuf(curFile) loadFile(buf43) } >
Bring up file-requester
<lAmiga-f1:
freeBuf(buf54)
insertRgn(buf54,eFile,buf38,hilite)
moveCursor(buf54,efile)
moveCursor(buf54,sChar)
if (not is(buf54,sfile)) if (is(buf54,"/")) clearChar(buf54)
if (fileRequest(buf54)) { .. if True, always has 2 lines
freeBuf(buf53)
insertRgn(buf53,efile,buf54,all)
moveCursor(buf53,sfile)
if (not is(buf53,eline)) moveCursor(buf53,eLine)
clearChar(buf53) .. erase the eol
loadFile(buf53)
}
if (isEmpty(buf54)) {
label(0)
putMsg("No selection or no Arp")
returnFalse
}
moveCursor(buf54,sfile) .. puts filename on line 2. outputs "*" if no
if (not is(buf54,"*")) if (not is(buf54,eLine)) {
freeBuf(buf53)
insertRgn(buf53,efile,buf54,line)
runKey(virtual-7) .. store dirname in buf38, if not already there
}
>
Save file currently in window
<normal-f2: saveFile(curFile) >
Save file under different name
<shft-f2: putMsg("Save file as:")
freeBuf(buf43)
if (inputString(buf43)) if (setFileName(curFile,buf43))
saveFile(curFile) >
Save all changed files
<alt-f2: getMaxFiles(n53)
decNum(n53)
do(n54,0,n53)
if (getFlag(buf[n54],changed)) saveFile(buf[n54]) >
Turn on/off saving changes during idle periods
<ctl-f2: flipFlag(curFile,userLocalA)>
Abort the current file save
<shftAlt-f2: abortSave >
Save hilite as...
<shftCtl-f2:
freeBuf(buf43)
insertRgn(buf43,atCursor,buf38,hilite)
putMsg("Save hilite as:")
if (not inputString(buf43)) return
freeBuf(buf54)
insertRgn(buf54,efile,curFile,hilite)
setFileName(buf54,buf43)
saveFile(buf54)
freeBuf(buf54)
>
Close current file. If changed, ask "Save changes?"
<normal-f3: if (not isEmpty(curFile)) if (getFlag(curFile,changed))
if (askYesNo("Save changes before closing?"))
if (not saveFile(curFile)) returnFalse
freeBuf(curFile) >
Save file, if changed, then close it
<shft-f3: if (getFlag(curFile,changed)) if (not saveFile(curFile))
returnFalse
freeBuf(curFile) >
Free all non-file buffers. Erases search buffer, directory name, etc
<alt-f3: getMaxFiles(n52)
do(n54,n52,54) freeBuf(buf[n54]) >
Ask "Save changes?", if any changes, then ask "Really quit?"
<normal-f4: if (not askYesNo("Really quit?")) returnFalse
equateNum(n53,0)
getMaxFiles(n52)
decNum(n52)
do(n54,0,n52) if (getFlag(buf[n54],changed)) equateNum(n53,1)
if (eqNum(n53,1)) if (askYesNo("Save changes?")) runKey(shft-f4)
quit(0) >
Save all changed files automatically, then quit
<shft-f4: getMaxFiles(n52)
decNum(n52)
do (n54,0,n52) if (getFlag(buf[n54],changed))
if (not saveFile(buf[n54])) returnFalse
quit(0) >
Quit fast, WITHOUT saving any files!!
<alt-f4: quit(10) >
Swap next 2 commands. (Mouse buttons, menu selections, gadgets, keys.)
<normal-f5: putMsg("Next 2 function keys will be swapped!")
if (getKey(n53)) if (getKey(n54)) if (swapKey(n53,n54))
{ putMsg("Keys were swapped.") return }
putMsg(" ") >
Toggle overstrike typing mode
<shft-f5: flipFlag(curFile,overstrike) >
Toggle autoindent typing mode
<alt-f5: flipFlag(curFile,autoIndent) >
Toggle wordwrap typing mode
<ctl-f5: flipFlag(curFile,wordWrap) >
Toggle "changed" status of current buffer
<lAmiga-f5: flipFlag(curFile,changed) >
Convert file to read-only status
<shftAlt-f5: flipFlag(curFile,readOnly) >
Toggle speak-messages status
<shftCtl-f5: flipFlag(curFile,speakMsgs) >
Toggle speak-alerts status
<altCtl-f5: flipFlag(curFile,speakAlerts) >
Toggle auto-backup mode
<shftAltCtl-f5: flipFlag(curFile,autoBackup) >
Select buffer 44 to use for scratch editing or writing commands
<shft-f6: editBuf(buf44)
putMsg("Type in command, <anykey: etc>, and press F6 to compile:") >
Save UE config to disk. Default is Data! or last name you gave
<alt-f6:
if (askYesNo("Save data?")) {
putMsg("Input data filename or pmESC:")
freeBuf(buf54)
inputString(buf54)
saveConfig(buf54)
} >
Restore UE config from disk. Default is Data! or last name you gave
<ctl-f6:
if (askYesNo("Load data?")) {
putMsg("Input data filename or pmESC:")
freeBuf(buf54)
inputString(buf54)
loadConfig(buf54)
} >
Compile configuration default values at the top of Config! file
<altCtl-f6: moveCursor(curFile,sFile)
if (not compileDefaults) beepDisplay>
Input the number of a buffer to edit
<shftAlt-f6: putMsg("Input number of buffer to edit:")
if (inputNum(n54)) { editBuf(buf[n54]) vScroll(sFile) } >
Examine all buffers that aren't empty
<shftCtl-f6: getMaxFiles(n52)
do (n54,n52,99) if (not isEmpty(buf[n54])) {
editBuf(buf[n54])
vScroll(sFile)
updateDisplay
putMsg("F1=continue, F2=edit this one, F3=stop:")
getKey(n53)
if (eqNum(n53,normal-f2)) { putMsg(" ") return }
if (eqNum(n53,normal-f3)) goto label(1)
}
label(1)
toggle(curFile)
putMsg(" ") >
Kill next command, including mouse button, menu selection, gadget, key
<shftAltCtl-f6:
putMsg("Next command-key will be deleted!")
if (getKey(n54)) if (killKey(n54))
{ putMsg("Key command was deleted.") return }
putMsg(" ") >
Find out if keys have got commands attached
<lAmiga-f6: putMsg("Press any key")
while (getKey(n54)) {
if (inUse(n54)) putMsg("In use - Amiga-esc=abort")
else putMsg("Available - Amiga-esc=abort")
}>
Push current buffer onto buffer stack
<lAmiga-w: push(curFile) runKey(virtual-w) >
Pop buffer stack
<rAmiga-w: getStackSize(n51,n52,n53)
if (geNum(0,n51)) {
putMsg("Buffer stack is empty")
returnFalse
}
if (not askYesNo("Replace current buffer, deleting old?"))
if (not newFile) {
putMsg("Can't open a file buffer")
returnFalse
}
pop(curFile)
runKey(virtual-w) >
Rotate buffer stack
<shftAlt-w: rollStack(curFile,1) runKey(virtual-w) >
Show number of buffers in stack
<virtual-w: getStackSize(n51,n52,n53)
freeBuf(buf54)
insertRgn(buf54,atCursor,"Buffers on stack: ",all)
toWord(buf54,n51)
putMsg(buf54) >
Input search text & search fwd. (Either-Or="$", wildcards= "?" & "*".)
<normal-f7: freeBuf(buf49) runKey(shft-f7) >
Modify existing search text and then search fwd
<shft-f7: putMsg("Input search string:")
inputString(buf49)
setSearch(buf49)
runKey(normal-f9) >
Input new search wild-card characters
<alt-f7: putMsg("Input single wild-card char:")
getChar(wildCard)
putMsg("Input multi wild-card char:")
getChar(multiWild)
putMsg("White on single wildcards: 0=no, 1=space/tab, 2=all white:")
getChar(n54)
if (geNum(n54,"0")) if (geNum("2",n54))
sub(singleWhite,n54,"0")
putMsg("White on multi wildcards: 0=no, 1=space/tab, 2=all white:")
getChar(n54)
if (geNum(n54,"0")) if (geNum("2",n54))
sub(multiWhite,n54,"0")
putMsg("Input all-but delimiter char:")
getChar(allBut)
putMsg(" ")>
Input new search either-or character
<ctl-f7: putMsg("Input new search either-or char:")
getChar(eitherOr)
putMsg(" ")>
Input replace text to use in search-replace
<normal-f8: freeBuf(buf48) runKey(shft-f8) >
Modify existing replace text
<shft-f8: putMsg("input replace string:") inputString(buf48) >
Search forward, mark matched region, put cursor at start of rgn
<normal-f9: if (eqLoc(curFile,atCursor,eInvert)) moveCursor(curFile,sChar)
if (search(curFile,sInvert,eInvert,1)) {
putMsg(" ")
return
}
runKey(virtual-f9) > .. failed search msg
Search backward, mark matched region, put cursor at start of rgn
<shft-f9: if (search(curFile,sInvert,eInvert,-1)) {
putMsg(" ")
return
}
runKey(virtual-f9) > .. failed search msg
Failed search message used by fwd/bkwd search.
<virtual-f9: putMsg("Search failed.")
equateLoc(curFile,sInvert,eInvert)
refreshDisplay
returnFalse >
Replace matched region with replace text, then search forward
<normal-f10: if (eqLoc(curFile,sInvert,eInvert)) returnFalse
clearRgn(curFile,invert)
insertRgn(curFile,sInvert,buf48,all)
runKey(normal-f9) >
Replace matched region with replace text, then search backward
<shft-f10: if (eqLoc(curFile,sInvert,eInvert)) returnFalse
clearRgn(curFile,invert)
insertRgn(curFile,sInvert,buf48,all)
runKey(shft-f9) >
Replace and continue forward search-replace until search fails
<alt-f10: while(runKey(normal-f10)) nothing >
Open a space under cursor for typing
<shft-del: insertChar(curFile," ") moveCursor(curFile,sChar)
if (is(curFile,sLine)) refreshDisplay>
Open line for typing below cursor line
<alt-del: if (not is(curFile,eLine)) moveCursor(curFile,eLine)
insertChar(curFile,eLine)>
Delete line above cursor line
<ctl-del: equateLoc(curFile,mouseLoc,atCursor)
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
if (not is(curFile,sFile)) {
moveCursor(curFile,upLine)
runKey(virtual-x) .. this runs ctl-d
moveCursor(curFile,mouseLoc)
}>
Open a space for typing in front of current word
<shft-bs: if (not is(curFile,sWord)) moveCursor(curFile,sWord)
runKey(shft-del)>
Open line for typing above the current line
<alt-bs: if (not is(curFile,sLine)) moveCursor(curFile,sLine)
insertChar(curFile,eLine) moveCursor(curFile,sChar)>
Delete line below cursor line
<ctl-bs: equateLoc(curFile,mouseLoc,atCursor)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
if (not is(curFile,eFile)) {
moveCursor(curFile,downLine)
runKey(virtual-x) .. this runs ctl-d
moveCursor(curFile,mouseLoc)
}>
*** Keypad Keys ***
Find cursor and center it in window
<normal-kp5: vScroll(atCursor) >
Delete word left, storing it in Undo buffer
<normal-kp7: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
equateLoc(curFile,locB,atCursor)
moveCursor(curFile,sWord)
equateLoc(curFile,locA,atCursor)
insertRgn(buf45,sFile,curFile,loc)
equateLoc(buf45,sPage,sFile)
clearRgn(curFile,loc) >
Delete word right, storing it in Undo buffer
<normal-kp9: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eWord)
equateLoc(curFile,locB,atCursor)
insertRgn(buf45,eFile,curFile,loc)
equateLoc(buf45,sPage,sFile)
clearRgn(curFile,loc) >
Move cursor up 1 line
<normal-kp8: moveCursor(curFile,upLine) >
Move cursor down 1 line
<normal-kp2: moveCursor(curFile,downLine) >
Move cursor to start of word
<normal-kp4: moveCursor(curFile,sWord) >
Move cursor to end of word
<normal-kp6: moveCursor(curFile,eWord) >
Set start of hilite region at cursor
<normal-kp1: equateLoc(curFile,sHilite,atCursor) refreshDisplay >
Set end of hilite region at cursor
<normal-kp3: equateLoc(curFile,eHilite,atCursor) refreshDisplay >
UNDO scratch deletes, inserting scratch delete buffer at cursor
<normal-kp0: insertRgn(curFile,atCursor,buf45,all) >
Copy hilite region into buffer
<normal-kpDot: if (getFlag(curFile,columnar)) { runKey(shftCtl-3) return }
if (gtLoc(curFile,eHilite,sHilite))
{ freeBuf(buf47) insertRgn(buf47,sFile,curFile,hilite)
equateLoc(buf47,sPage,sFile) }
else returnFalse >
Copy hilite region into buffer, then delete hilite region
<normal-kpMinus: if (getFlag(curFile,columnar)) { runKey(shftCtl-1) return }
if (runKey(normal-kpDot)) clearRgn(curFile,hilite) >
Insert copied hilite at cursor
<normal-kpEnter: if (getFlag(curFile,columnar)) { runKey(shftCtl-4) return }
if (is(curFile,sFile)) {
equateLoc(curFile,sHilite,atCursor)
equateLoc(curFile,eHilite,sHilite)
} else {
equateLoc(curFile,sHilite,atCursor)
decLoc(curFile,sHilite)
equateLoc(curFile,eHilite,atCursor)
}
insertRgn(curFile,atCursor,buf47,all)
if (eqLoc(curFile,atCursor,sHilite))
equateLoc(curFile,sHilite,sFile)
else incLoc(curFile,sHilite)
if (not onScreen(atCursor)) vScroll(atCursor) >
Find cursor and center it in window
<shft-kp5: vScroll(atCursor) >
Delete char to left of cursor, storing it in Undo buffer
<shft-kp7: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
equateLoc(curFile,locB,atCursor)
moveCursor(curFile,sChar)
equateLoc(curFile,locA,atCursor)
insertRgn(buf45,sFile,curFile,loc)
equateLoc(buf45,sPage,sFile)
clearRgn(curFile,loc) >
Delete char under cursor, storing it in Undo buffer
<shft-kp9: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eChar)
equateLoc(curFile,locB,atCursor)
insertRgn(buf45,eFile,curFile,loc)
equateLoc(buf45,sPage,sFile)
clearRgn(curFile,loc) >
Move cursor up one line
<shft-kp8: moveCursor(curFile,upLine) >
Move cursor down one line
<shft-kp2: moveCursor(curFile,downLine) >
Move cursor left 1 char
<shft-kp4: moveCursor(curFile,sChar) >
Move cursor right 1 char
<shft-kp6: moveCursor(curFile,eChar) >
Set start of hilite region at cursor
<shft-kp1: runKey(normal-kp1) >
Set end of hilite region at cursor
<shft-kp3: runKey(normal-kp3) >
UNDO scratch deletes, inserting scratch delete buffer at cursor
<shft-kp0: runKey(normal-kp0) >
Copy hilite region into buffer
<shft-kpDot: runKey(normal-kpDot) >
Copy hilite region into buffer, then delete hilite region
<shft-kpMinus: runKey(normal-kpMinus) >
Insert copied hilite region at cursor
<shft-kpEnter: runKey(normal-kpEnter) >
Find cursor and center it in window
<alt-kp5: vScroll(atCursor) >
Delete to start of line, storing it in Undo buffer
<alt-kp7: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
if (is(curFile,sLine)) runKey(shft-kp7)
else {
equateLoc(curFile,locB,atCursor)
moveCursor(curFile,sLine)
equateLoc(curFile,locA,atCursor)
insertRgn(buf45,sFile,curFile,loc)
equateLoc(buf45,sPage,sFile)
clearRgn(curFile,loc)
} >
Delete to end of line, storing it in Undo buffer
<alt-kp9: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
if (is(curFile,eLine)) runKey(shft-kp9)
else {
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,eLine)
equateLoc(curFile,locB,atCursor)
insertRgn(buf45,eFile,curFile,loc)
equateLoc(buf45,sPage,sFile)
clearRgn(curFile,loc)
} >
Move cursor to start of page
<alt-kp8: moveCursor(curFile,sPage) vScroll(atCursor)>
Move cursor to end of page
<alt-kp2: moveCursor(curFile,ePage) >
Move cursor to start of line
<alt-kp4: moveCursor(curFile,sLine) >
Move cursor to end of line
<alt-kp6: moveCursor(curFile,eLine) >
Set start of hilite region at cursor
<alt-kp1: runKey(normal-kp1) >
Set end of hilite region at cursor
<alt-kp3: runKey(normal-kp3) >
UNDO scratch deletes, inserting scratch delete buffer at cursor
<alt-kp0: runKey(normal-kp0) >
Copy hilite region into buffer
<alt-kpDot: runKey(normal-kpDot) >
Copy hilite region into buffer, then delete hilite region
<alt-kpMinus: runKey(normal-kpMinus) >
Insert copied hilite region at cursor
<alt-kpEnter: runKey(normal-kpEnter) >
Find cursor and center it in window
<ctl-kp5: vScroll(atCursor) >
Delete from cursor to start of page, storing it in Undo buffer
<ctl-kp7: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
equateLoc(curFile,locB,atCursor)
moveCursor(curFile,sPage)
equateLoc(curFile,locA,atCursor)
insertRgn(buf45,sFile,curFile,loc)
equateLoc(buf45,sPage,sFile)
clearRgn(curFile,loc)
vScroll(atCursor)
updateDisplay >
Delete from cursor to end of page, storing it in Undo buffer
<ctl-kp9: if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
equateLoc(curFile,locA,atCursor)
moveCursor(curFile,ePage)
equateLoc(curFile,locB,atCursor)
insertRgn(buf45,eFile,curFile,loc)
equateLoc(buf45,sPage,sFile)
clearRgn(curFile,loc)
updateDisplay >
Move cursor to start of form
<ctl-kp8: moveCursor(curFile,sForm) >
Move cursor to end of form
<ctl-kp2: moveCursor(curFile,eForm) >
Move cursor to start of line
<ctl-kp4: moveCursor(curFile,sLine) >
Move cursor to end of line
<ctl-kp6: moveCursor(curFile,eLine) >
Set start of invert region at cursor
<ctl-kp1: equateLoc(curFile,sInvert,atCursor) refreshDisplay >
Set end of invert region at cursor
<ctl-kp3: equateLoc(curFile,eInvert,atCursor) refreshDisplay >
UNDO scratch deletes, inserting scratch delete buffer at cursor
<ctl-kp0: runKey(normal-kp0) >
Give message telling turn OFF columnar if columnar is ON.
<virtual-kpDot:
if (getFlag(curFile,columnar)) {
alertuser("Turn OFF columnar display mode first. (See Columnar menu.)")
abort } >
Copy invert region into buffer
<ctl-kpDot: runKey(virtual-kpDot)
if (gtLoc(curFile,eInvert,sInvert))
{ freeBuf(buf46) insertRgn(buf46,sFile,curFile,invert)
equateLoc(buf46,sPage,sFile) }
else returnFalse >
Copy invert region into buffer, then delete invert region
<ctl-kpMinus: runKey(virtual-kpDot)
runKey(ctl-kpDot) clearRgn(curFile,invert) >
Insert copied invert region at cursor
<ctl-kpEnter: runKey(virtual-kpDot)
if (is(curFile,sFile)) {
equateLoc(curFile,sInvert,atCursor)
equateLoc(curFile,eInvert,sInvert)
} else {
equateLoc(curFile,sInvert,atCursor)
decLoc(curFile,sInvert)
equateLoc(curFile,eInvert,atCursor)
}
insertRgn(curFile,atCursor,buf46,all)
if (eqLoc(curFile,atCursor,sInvert))
equateLoc(curFile,sInvert,sFile)
else incLoc(curFile,sInvert)
if (not onScreen(atCursor)) vScroll(atCursor) >
*** miscellaneous keys ***
Set new line-length
<ctl-return: putMsg("Enter new line-length:")
if (inputNum(n54))
{ setLocal(curFile,lineLength,n54) equateNum(lineLength,n54) } >
Transparent tab forward
<shft-tab: moveCursor(curFile,eTab) >
Transparent tab backward
<alt-tab: moveCursor(curFile,sTab) >
Untab - delete white space back to previous tab column
<ctl-tab: equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sTab)
while (nothing) {
if (is(curFile,space)) goto label(1)
if (is(curFile,9)) goto label(1) .. a TAB
return
label(1)
clearChar(curFile)
if (eqLoc(curFile,atCursor,locA)) return
}>
Switch to/from using spaces for tabs or using real tabs
<altCtl-tab: flipFlag(curFile,trueTabs)>
Show tab ruler above cursor line
<shftAlt-tab: seeRuler>
Set tab ruler using mouse or keys
<shftCtl-tab:
putMsg(
"Use mouse click/drag, Tab, Space, BS, Del (anykey=quit,Amiga-ESC=abort)")
setRuler putMsg(" ") >
Convert tabs in document to spaces
<lAmiga-t: tabsToSpaces >
Convert spaces in document to TABs
<rAmiga-t: spacesToTabs >
Set TAB table number (0-4) to use for TAB spacing
<shftAltCtl-tab:
putMsg("Enter new tab table # (0-4):")
if (inputNum(n54)) if (geNum(n54,0)) if (geNum(4,n54))
{ setLocal(curFile,tabTable,n54) equateNum(tabTable,n54) } >
Toggle "busies" setting - when turned on, it shows buffers being worked on
<ctl-b: flipFlag(curFile,busies) >
Trim spaces between the next two words after cursor
<alt-c: while (not is(curFile,space))
{ moveCursor(curFile,eChar) if (is(curFile,eFile)) returnTrue }
moveCursor(curFile,eChar)
while (is(curFile,space)) clearChar(curFile) >
Let next character typed be a CTRL-character, such as formfeed, etc
<ctl-c: putMsg("Input a control character:")
getChar(n54)
if (geNum(31,n54)) goto label(1)
if (geNum(n54,64)) if (geNum(127,n54)) {
label(1)
and(n54,n54,31)
insertChar(curFile,n54)
}
putMsg(" ") >
Count number of times the next command is successfully executed
<shftAlt-c: equateNum(n90,0)
putMsg("Input command to execute & count:")
if (getKey(n91)) {
while (runKey(n91)) incNum(n90)
freeBuf(buf54)
insertRgn(buf54,sFile,"Times executed = ",all)
toWord(buf54,n90)
putMsg(buf54)
} >
Delay the amount of time (tenths of seconds) stored using shftAlt-d
<alt-d: delay(n46) >
Delete cursor line, storing it in Undo buffer. (See keypad-0/7/9.)
<ctl-d: runKey(virtual-x)
>
Delete cursor line
<virtual-x:
if (not eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
equateLoc(curFile,locB,atCursor)
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
if (not eqLoc(curFile,locB,atCursor)) {
equateLoc(curFile,locA,atCursor)
insertRgn(buf45,sFile,curFile,loc)
clearRgn(curFile,loc)
} else equateLoc(curFile,locA,atCursor)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
moveCursor(curFile,eChar)
equateLoc(curFile,locB,atCursor)
insertRgn(buf45,eFile,curFile,loc)
equateLoc(buf45,sPage,sFile)
clearRgn(curFile,loc) >
Set the delay variable to some value in tenths of seconds
<shftAlt-d: putMsg("Input # tenths of seconds (used in delays)")
inputNum(n46) >
Change end-of-line character
<alt-e: putMsg("Input new end-of-line value (usually 10 or 13):")
inputNum(n54)
setEol(n54)
refreshDisplay >
Change current document's end-of-line character
<ctl-e:
putMsg("Input file's current end-of-line value (usually 10 or 13):")
inputNum(n54)
if (not gtNum(n54,0)) returnFalse
putMsg("Input new end-of-line value (usually 10 or 13):")
inputNum(n53)
if (not gtNum(n53,0)) returnFalse
setEol(n54)
moveCursor(curFile,sFile)
putMsg("Changing eol characters ... Amiga-ESC=abort.")
while (moveCursor(curFile,eLine))
if (is(curFile,n54)) swapChar(curFile,n53)
setEol(n53)
vScroll(sFile)
putMsg(" ")
refreshDisplay >
Input the number of buffer to free
<alt-f: putMsg("Input buffer # to free:")
if (inputNum(n54)) freeBuf(buf[n54]) >
Flip upper/lower case of char under cursor
<ctl-f: if (is(curFile,alpha)) {
if (is(curFile,lowerCase)) toUpper(curFile)
else toLower(curFile)
}
moveCursor(curFile,eChar) >
Toggle the mark-gadgets setting. When "off", the gadget names don't show
<ctl-g: flipFlag(curFile,markGadgets) >
Input a new lines/page value
<alt-g: putMsg("Enter new lines/page setting:")
inputNum(n54)
if (gtNum(n54,0))
{ setLocal(curFile,pageLines,n54) equateNum(pageLines,n54) } >
Uncolor the hilite region
<alt-h: equateLoc(curFile,sHilite,eHilite) refreshDisplay >
Erase hilite region. No Copy is made!
<ctl-h: clearRgn(curFile,hilite) >
Uncolor the invert region
<alt-i: equateLoc(curFile,sInvert,eInvert) refreshDisplay >
Erase the invert region. No Copy is made!
<ctl-i: clearRgn(curFile,invert) >
Scan index buffer, build an index. (See shftAlt-buttonDown/buttonUp.)
<shftAlt-i:
if (isEmpty(buf41)) returnFalse
runKey(alt-g) .. Could elim. get lines-per-page setting to use
freeBuf(buf54)
.. erase duplicate items in buf41
putMsg("Working....")
label(10) .. get next index item
moveCursor(buf41,sFile)
while (is(buf41,whiteSpace)) clearChar(buf41) .. clear any blank lines
if (is(buf41,eFile)) goto label(11) .. done finding duplicates
equateLoc(buf41,sInvert,atCursor) .. mark start
moveCursor(buf41,downLine)
equateLoc(buf41,eInvert,atCursor) .. mark end
freeBuf(buf49)
insertRgn(buf49,eFile,buf41,invert) .. copy item to buf49
clearRgn(buf41,invert) .. erase from buf41
insertRgn(buf54,eFile,buf49,all) .. add it to buf54
moveCursor(buf41,eFile) .. search bkwd for dups
setSearch(buf49)
while (search(buf41,sInvert,eInvert,-1)) {
clearRgn(buf41,invert) .. erase the dup
.. moveCursor(buf41,eFile) .. shouldn't need this
}
goto label(10) .. get next item, unless buf41 empty now.
label(11)
freeBuf(buf41) .. starting over
insertRgn(buf41,eFile,buf54,all) .. store no-dup list in buf41
freeBuf(buf54) .. erase old list in buf54
.. NOTE: should have used swapBuf instead
label(1)
moveCursor(buf41,sFile)
while (is(buf41,whiteSpace)) clearChar(buf41) .. clear lead white space
if (is(buf41,eFile)) { .. buf41 empty, must be finished
swapBuf(buf54,buf41) .. index was in buf54
freeBuf(buf54)
setFileName(buf41,"Index")
equateLoc(buf41,sPage,sFile)
equateLoc(buf41,atCursor,sFile)
putMsg("Press ctl-w to see Index") .. finished
return
}
freeBuf(buf49)
insertRgn(buf49,sFile,buf41,line) .. load search string with item.
clearRgn(buf41,line) .. erase the item
putMsg(buf49) .. show the item
moveCursor(buf54,eFile) .. put item at end of index building
insertRgn(buf54,eFile,buf49,all)
insertRgn(buf54,eFile," ",all) .. space before page #s that go in
insertChar(buf54,eLine)
moveCursor(buf54,sChar)
equateNum(n53,0) .. so know if need comma
moveCursor(curFile,sFile)
label(2)
setSearch(buf49)
while (search(curFile,sInvert,eInvert,1)) {
moveCursor(curFile,sChar)
if (is(curFile,alpha)) {
label(3) .. part of a bigger word so ignore
moveCursor(curFile,eInvert)
goto label(2) .. and resume search
}
if (is(curFile,digit)) goto label(3) .. part of bigger word, ignore
moveCursor(curFile,eInvert)
if (is(curFile,alpha)) goto label(2) .. part of bigger word, ignore
if (is(curFile,digit)) goto label(2) .. ditto
getPageRowCol(n54,n50,n49) .. this uses display
moveCursor(curFile,eForm) .. don't search again on this page
if (not eqNum(n53,0)) insertChar(buf54,",") .. put comma if not 1st #
toWord(buf54,n54) .. install the page # after index item
equateNum(n53,n54) .. so will put in comma next time for sure
}
goto label(1) .. get next item from buf41
>
Toggle the "make icons" flag. When "on", Workbench icons are created
<altCtl-i: flipFlag(curFile,icons)>
Enter idle-timer value (tenths of sec) after which idle command executed
<shftAltCtl-i: putMsg("Input idle time (tenths of a second)")
if (inputNum(n54)) equateNum(idleTime,n54)>
Toggle the right-justify typing mode
<alt-j: flipFlag(curFile,rightJustify) >
Join next line to cursor line
<ctl-j: if (not is(curFile,eLine)) moveCursor(curFile,eLine)
equateLoc(curFile,locA,atCursor)
label(1)
moveCursor(curFile,eChar)
if (is(curFile,space)) goto label(1)
if (is(curFile,9)) goto label(1) .. a TAB
equateLoc(curFile,locB,atCursor)
clearRgn(curFile,loc)
insertChar(curFile," ") >
Move the hilite to the left by one character (space or tab)
<alt-l: moveCursor(curFile,sHilite)
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
label(1)
if (is(curFile,space)) clearChar(curFile)
else if (is(curFile,9)) clearChar(curFile) .. a TAB
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
moveCursor(curFile,eChar) .. start of next line
if (gtLoc(curFile,eHilite,atCursor)) goto label(1) >
Convert the character under the cursor to lower case and move cursor fwd
<ctl-l: toLower(curFile) moveCursor(curFile,eChar) >
Set bottom margin
<lAmiga-l: putMsg("Input bottom margin lines (0-200):")
if (inputNum(n54)) equateNum(bottomMargin,n54)
setLocal(curFile,bottomMargin,bottomMargin)>
Set command multiplier to use for next command
<ctl-m: putMsg("Input command multiplier:") inputNum(cmdMultiplier) >
Swap the mouse's button-Up operation with the next key-command pressed
<alt-m: putMsg("Will swap mouse buttonUp with your next input:")
if (getKey(n53)) if (swapKey(n53,normal-buttonUp))
{ putMsg("Swapped - to undo, do it again") return }
putMsg(" ") >
Map illegal ASCII (0 thru 5) characters into safe ones. (See top of Config!)
<shftAlt-m: flipFlag(curFile,mapChars)>
Rename the document in the window
<alt-n: putMsg("Input new filename:")
getFileName(buf43,curFile)
if (inputString(buf43))
setFileName(curFile,buf43) >
Input a text line number to go to
<ctl-n: putMsg("Input line number:")
if (inputNum(n54))
{ lineToLoc(curFile,atCursor,n54) vScroll(atCursor) } >
Open the cursor line for typing
<ctl-o: insertChar(curFile,eLine) moveCursor(curFile,sChar) >
Move the hilite region to the right by one space
<alt-r: moveCursor(curFile,sHilite)
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
label(1)
if (gtLoc(curFile,eHilite,atCursor)) {
insertChar(curFile,32)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
moveCursor(curFile,eChar)
goto label(1)
} >
Terminate Learn Mode or run whatever is stored in learn-buffer. (See ctl-s.)
<ctl-r: runLearn >
Speak the hilite region, a line at a time
<alt-s: if (gtLoc(curFile,eHilite,sHilite)) {
equateLoc(curFile,locA,atCursor)
equateLoc(curFile,sInvert,sHilite)
equateLoc(curFile,atCursor,sHilite)
while (gtLoc(curFile,eHilite,sInvert)) {
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
moveCursor(curFile,eChar)
if (gtLoc(curFile,atCursor,eHilite))
equateLoc(curFile,eInvert,eHilite)
else equateLoc(curFile,eInvert,atCursor)
if (gtLoc(curFile,eInvert,sInvert)) {
freeBuf(buf50)
insertRgn(buf50,sFile,curFile,invert)
speak(buf50)
}
equateLoc(curFile,sInvert,atCursor)
}
equateLoc(curFile,atCursor,locA)
} >
Start/abort Learn Mode. (Use ctl-r to finish & to run it.)
<ctl-s: if (not getFlag(curFile,learnMode)) putMsg("LEARN MODE ACTIVE!")
else putMsg("Learn Mode cancelled.")
flipFlag(curFile,learnMode) >
Show key-help message on next key pressed. Copy key-help to RAM: on first
<ctl-t: putMsg("Input a key, gadget, click etc to get Help msg")
getKey(n54)
teachOne(n54)>
Toggle between using printable keys for commands or for normal typing input
<alt-u: flipFlag(curFile,useKeys)>
Load UStar config
<virtual-u: if (not loadConfig("UstarData!")) loadConfig("S:UstarData!") >
Convert char under cursor to upper case
<ctl-u: toUpper(curFile) moveCursor(curFile,eChar) >
Set left margin
<lAmiga-m: putMsg("Input left margin column (0-200):")
if (inputNum(n54)) equateNum(leftMargin,n54)
setLocal(curFile,leftMargin,leftMargin)>
Set top margin
<lAmiga-u: putMsg("Input top margin lines (0-200):")
if (inputNum(n54)) equateNum(topMargin,n54)
setLocal(curFile,topMargin,topMargin)>
Switch flag that makes CTRL chars vis/invis
<ctl-v: flipFlag(curFile,spooks) refreshDisplay >
Swap the current document in window with buffer 41
<ctl-w: swapBuf(curFile,buf41) >
Swap current buffer to buffer 0 (the "home" buffer of Uedit)
<alt-w: swapBuf(buf0,curFile) editBuf(buf0) >
For programmers: Toggle number under cursor between hex/decimal
<ctl-x: hexDecimal(curFile) >
Execute an AmigaDOS command, but don't collect the results
<ctl-y: putMsg("Enter AmigaDOS command")
freeBuf(buf40)
if (inputString(buf40)) execute(" ",buf40) >
Execute an AmigaDOS command and show the results
<ctl-z: putMsg("Enter AmigaDOS command")
freeBuf(buf40)
if (not inputString(buf40)) returnFalse
freeBuf(buf39)
if (not execute(buf39,buf40)) returnFalse
if (not isEmpty(buf39))
{ putMsg("Result of AmigaDOS command:")
flipFlag(buf39,changed)
editBuf(buf39)
vscroll(sFile)
updateDisplay
} else
{ putMsg("No reply from AmigaDOS.") freeBuf(buf39) } >
Searcu for buf53 dirname in buf38. Add name to list if not there.
<virtual-7:
moveCursor(buf53,eFile)
decLoc(buf53,atCursor)
if (not is(buf53,"/")) if ( not is(buf53,":"))
insertRgn(buf53,eFile,"/",all)
if (isEmpty(buf38)) runKey(virtual-8) .. default dir names
.. if (isEmpty(buf38)) goto label(0)
moveCursor(buf38,sFile)
equateLoc(buf38,eHilite,sHilite)
label(1)
while (is(buf38,whiteSpace)) moveCursor(buf38,eChar)
if (is(buf38,eFile)) goto label(0) .. add it
equateLoc(buf38,sHilite,atCursor) .. store start
while (not is(buf38,whiteSpace)) {
if (is(buf38,eFile)) goto label(2)
moveCursor(buf38,eChar)
}
label(2)
equateLoc(buf38,eHilite,atCursor) .. store end
freeBuf(buf52)
insertRgn(buf52,sFile,buf38,hilite)
if (not stringComp(n54,buf53,buf52,1)) goto label(1) .. try again
moveCursor(buf38,sHilite) .. found dirname. Put cursor at start
goto label(5)
label(0) .. dirname not found. Add it
moveCursor(buf38,eFile)
if (not isEmpty(buf53)) {
locToCol(buf38,n54,atCursor)
if (gtNum(n54,60)) insertChar(buf38,eLine)
else insertChar(buf38,9) .. tab insertRgn(buf38,atCursor," ",all)
}
equateLoc(buf38,sHilite,eFile)
decLoc(buf38,sHilite)
insertRgn(buf38,eFile,buf53,all) .. install new dirname as curdir
equateLoc(buf38,eHilite,eFile)
incLoc(buf38,sHilite)
moveCursor(buf38,sHilite)
equateNum(n54,curFile)
label(5)
freeBuf(buf53)
if (not eqNum(n54,38))
if (gotoSplit(buf38)) gotoSplit(buf[n54]) .. force refresh
runKey(virtual-9)
>
Load beginning directory names into buf38
<virtual-8:
if (isEmpty(buf38)) {
if (not insertFile(buf38,eFile,"S:Directories"))
insertRgn(buf38,eFile," DF0: DF1: DH0: S: RAM: VD0:",all)
moveCursor(buf38,eFile)
equateLoc(buf38,sHilite,eHilite)
equateLoc(buf38,mouseLoc,eFile)
}
equateLoc(buf38,sPage,sFile) >
Put up msg telling what click-loading directory now is.
<virtual-9:
freeBuf(buf53)
insertRgn(buf53,eFile,"Click-loading directory = ",all)
if (gtLoc(buf38,eHilite,sHilite)) insertRgn(buf53,eFile,buf38,hilite)
else insertRgn(buf53,eFile,"default",all)
putMsg(buf53)
freebuf(buf53) >
Get listing. (Also sets directoryname used in ctl-buttonDown.)
<alt-z: putMsg("Enter directory: ")
freeBuf(buf53)
if (inputString(buf53)) runKey(virtual-7)
freeBuf(buf54)
insertRgn(buf54,eFile,"Dir ",all)
insertRgn(buf54,eFile,buf38,hilite)
if (not execute(buf39,buf54)) returnFalse
moveCursor(buf39,sFile)
insertChar(buf39,eLine)
insertRgn(buf39,sFile,buf38,hilite)
newFile
swapBuf(buf39,curFile)
freeBuf(buf39)
vScroll(sFile)
putMsg("To load files, ctrl-click names with mouse.")
setFileName(curFile,buf54)
flipFlag(curFile,changed) >
Change the current working directory
<altCtl-z: putMsg("Change current directory to (may not work in Workbench):")
freeBuf(buf53)
if (inputString(buf53)) changeDir(buf53) >
Clear leading white space in cursor line
<alt-1: equateLoc(curFile,locA,atCursor)
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
while (is(curFile,whiteSpace)) {
if (is(curFile,eLine)) goto label(1)
if (is(curFile,12)) goto label(1) .. formfeed
clearChar(curFile)
}
label(1)
equateLoc(curFile,atCursor,locA) >
Center text in the line. (Uses current line length.)
<alt-2:
runKey(alt-1) .. clear leading white space
if (is(curFile,blankLine)) returnFalse
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
locToCol(curFile,n53,atCursor)
equateNum(n54,lineLength)
incNum(n54)
if (gtNum(n54,n53)) {
moveCursor(curFile,sLine)
sub(n53,n54,n53)
div(n53,n53,2)
do (n54,2,n53) insertChar(curFile," ")
} >
Match indent of cursor line to previous line
<alt-4: equateNum(n54,0)
moveCursor(curFile,upLine)
if (not getFlag(curFile,autoIndent)) {
flipFlag(curFile,autoIndent)
equateNum(n54,1)
}
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
clearChar(curFile)
typeChar(eLine)
if (eqNum(n54,1)) flipFlag(curFile,autoIndent)
moveCursor(curFile,downLine) >
Right-align the cursor line from cursor rightward
<alt-5: if (not is(curFile,whiteSpace)) moveCursor(curFile,sChar)
if (is(curFile,eLine)) goto label(0)
while (is(curFile,whiteSpace)) {
if (is(curFile,sLine)) goto label(0)
clearChar(curFile)
moveCursor(curFile,sChar)
}
label(0)
moveCursor(curFile,eChar)
equateLoc(curFile,locA,atCursor)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
locToCol(curFile,n54,atCursor)
decNum(n54)
getLocal(curFile,n53,lineLength)
sub(n54,n53,n54)
moveCursor(curFile,locA)
if (gtNum(n54,0)) while (decNum(n54)) insertChar(curFile," ") >
Show the value of a number variable
<alt-8: putMsg("n-variable #: ")
inputNum(n54)
freeBuf(buf54)
insertChar(buf54,"n")
toWord(buf54,n54)
insertRgn(buf54,eFile," is ",all)
toWord(buf54,n[n54])
putMsg(buf54) >
Set the value of a number variable
<alt-9: putMsg("Set n-variable #:")
inputNum(n54)
putMsg("To value:")
inputNum(n[n54])>
Show the ASCII value of the character under the cursor
<ctl-/: copyChar(curFile,n54)
freeBuf(buf54)
toWord(buf54,n54)
insertRgn(buf54,sFile,"Character value under cursor was ",all)
putMsg(buf54)
moveCursor(curFile,eChar) >
Show the current document size
<ctl-1: fileSize(curFile,n54)
freeBuf(buf54)
insertRgn(buf54,sFile,"File size in bytes: ",all)
toWord(buf54,n54)
putMsg(buf54)>
Switch displaying of cursor row-column off/on
<ctl-2: flipFlag(curFile,rowCol) >
This is a simple reformat cmd that doesn't refmt indented paragraphs.
.. <ctl-3: if (reformat) moveCursor(curFile,echar) >
Reformat cursor paragraph, starting at cursor line
<ctl-3: .. move down, if blank line, to find par beginning.
while (is(curFile,blankLine)) {
moveCursor(curFile,downLine)
if (not is(curFile,eLine)) moveCursor(curFile,eLine)
if (is(curFile,eFile)) returnFalse
}
equateNum(n3,0) .. a flag used below
equateLoc(curFile,locA,atCursor) .. store par beginning
label(2) .. get indent of 1st par line
if (not is(curFile,sLine)) moveCursor(curFile,sLine)
while (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
locToCol(curFile,n0,atCursor) .. get the 1st line's indent
if (eqNum(n3,0)) { .. if doing FIRST line
equateNum(n1,n0) .. store indent of 1st par line
equateNum(n3,1) .. set a flag so won't come back here
equateLoc(curFile,locB,atCursor) .. store 1st text location
moveCursor(curFile,downLine) .. move to 2nd line
if (is(curFile,blankLine)) { .. no second line
equateNum(n0,1)
goto label(3)
}
goto label(2) .. go back and get indent of 2nd par line
}
label(3)
moveCursor(curFile,upLine) .. move back to 1st line
equateNum(n2,n0) .. store indent of 2nd line
if (eqNum(n2,-1)) goto label(4) .. was no 2nd line
if (geNum(n2,n1)) { .. 2nd line inset, so do only 1st line
label(4)
reformat
goto label(5) .. finished
} else { .. 2nd line has less or equal indent
sub(n1,n1,n2) .. par indent = 1st indent minus 2nd
colToLoc(curFile,atCursor,n2)
equateLoc(curFile,locA,atCursor)
clearRgn(curFile,loc) .. wiping out extra 1st line indent
do (n54,1,n1) insertChar(curFile,"x") .. repl with x's
moveCursor(curFile,sWord) .. made a FAKE WORD
equateLoc(curFile,locA,atCursor) .. store its loc
reformat .. now paragrah has SAME indent
equateLoc(curFile,locB,atCursor) .. store end of par
moveCursor(curFile,locA) .. go back to fake word
while (is(curFile,"x")) { .. swap x's for spaces
swapChar(curFile," ")
moveCursor(curFile,eChar)
} .. now fake word is gone
equateLoc(curFile,atCursor,locB) .. goto end of par
label(5)
moveCursor(curFile,eChar) .. leave paragraph
}
>
Delete all trailing white-space in current document
<ctl-4: equateLoc(curFile,locA,atCursor)
moveCursor(curFile,sFile)
label(1)
if (is(curFile,eFile))
{ equateLoc(curFile,atCursor,locA) return }
moveCursor(curFile,eLine)
moveCursor(curFile,sChar)
label(2)
if (is(curFile,space))
{ clearChar(curFile) moveCursor(curFile,sChar) goto label(2)}
if (is(curFile,9)) .. a TAB
{ clearChar(curFile) moveCursor(curFile,sChar) goto label(2)}
moveCursor(curFile,eLine)
goto label(1) >
Save a learn-sequence to disk, saving it under a Name
<ctl-5: putMsg("Save learn seq under what Name?")
freeBuf(buf54)
if (inputString(buf54))
if (not saveLearn(buf54)) putMsg("Couldn't save") >
Load a learn-sequence stored on disk
<ctl-6: putMsg("Load what learn seq Name?")
freeBuf(buf54)
if (inputString(buf54))
if (not loadLearn(buf54)) putMsg("Not found") >
Load and run learn-sequence stored on disk
<ctl-7: putMsg("Load & run what learn seq Name?")
freeBuf(buf54)
if (inputString(buf54))
if (loadLearn(buf54)) runLearn else putMsg("Not found") >
Toggle case-sensitivity of search
<ctl-8: flipFlag(curFile,searchCaps) >
*** arithmetic commands ***
Set running arithmetic total to zero
<ctl-0: equateNum(n49,0) >
Type the running arithmetic total into text at cursor
<ctl-\: freeBuf(buf54)
div(n52,n49,100)
if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
toWord(buf54,n52)
insertChar(buf54,".")
if (gtNum(0,n49)) mul(n52,n49,-1)
else equateNum(n52,n49)
mod(n52,n52,100)
if (gtNum(10,n52)) insertChar(buf54,"0")
toWord(buf54,n52)
insertRgn(curFile,atCursor,buf54,all)
insertRgn(buf54,sFile,"Inserted total into text ",all)
putMsg(buf54) >
Add the next word (if a number) to arithmetic total & display total
<ctl-=: moveCursor(curFile,eWord)
moveCursor(curFile,sWord)
if (not is(curFile,digit)) returnFalse
toNumber(n54,curFile)
moveCursor(curFile,eWord)
if (is(curFile,".")) {
moveCursor(curFile,eChar)
if (not is(curFile,digit)) goto label(1)
toNumber(n53,curFile)
moveCursor(curFile,eChar)
if (not is(curFile,digit)) {
mul(n53,n53,10)
moveCursor(curFile,sChar)
}
moveCursor(curFile,eWord)
} else { label(1) equateNum(n53,0) }
mul(n54,n54,100)
if (gtNum(0,n54)) mul(n52,n53,-1)
else equateNum(n52,n53)
add(n54,n54,n52)
add(n49,n49,n54)
freeBuf(buf54)
div(n52,n49,100)
if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
toWord(buf54,n52)
insertChar(buf54,".")
mod(n52,n49,100)
if (gtNum(0,n49)) mul(n52,-1,n52)
if (gtNum(10,n52)) insertChar(buf54,"0")
toWord(buf54,n52)
insertRgn(buf54,sFile,"Running total is ",all)
putMsg(buf54) >
Subtract the next word (if a number) from arithmetic total & display total
<ctl--: moveCursor(curFile,eWord)
moveCursor(curFile,sWord)
if (not is(curFile,digit)) returnFalse
toNumber(n54,curFile)
moveCursor(curFile,eWord)
if (is(curFile,".")) {
moveCursor(curFile,eChar)
if (not is(curFile,digit)) goto label(1)
toNumber(n53,curFile)
moveCursor(curFile,eChar)
if (not is(curFile,digit)) {
mul(n53,n53,10)
moveCursor(curFile,sChar)
}
moveCursor(curFile,eWord)
} else { label(1) equateNum(n53,0) }
mul(n54,n54,100)
if (gtNum(0,n54)) mul(n52,n53,-1)
else equateNum(n52,n53)
add(n54,n54,n52)
sub(n49,n49,n54)
freeBuf(buf54)
div(n52,n49,100)
if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
if (gtNum(0,n49)) insertChar(buf54,"-")
toWord(buf54,n52)
insertChar(buf54,".")
mod(n52,n49,100)
if (gtNum(0,n52)) mul(n52,n52,-1)
if (gtNum(10,n52)) insertChar(buf54,"0")
toWord(buf54,n52)
insertRgn(buf54,sFile,"Running total is ",all)
putMsg(buf54) >
*** columnar data ***
Put up msg saying turn ON columnar if it is OFF.
<virtual-`: if (not getFlag(curFile,columnar)) {
alertUser("Turn ON columnar display mode first. (See Columnar menu.)")
abort
} >
..flipFlag(curFile,columnar)>
Toggle between columnar display and regular hilite/invert display mode
<shftCtl-`: flipFlag(curFile,columnar) refreshDisplay>
Copy and then clear the hilited columnar data
<shftCtl-1: runKey(virtual-`)
freeBuf(buf37)
copyColData(buf37,sFile,curFile,hilite,1)
clearColData(curFile,hilite,0) >
Space-fill the hilited columnar data, overlaying the original text. No copy
<shftCtl-2: runKey(virtual-`)
clearColData(curFile,hilite,1) >
Copy the hilited columnar data into a buffer
<shftCtl-3: runKey(virtual-`)
if (geLoc(curFile,sHilite,eHilite)) returnFalse
freeBuf(buf37) copyColData(buf37,sFile,curFile,hilite,1)>
Insert copied columnar data at the cursor
<shftCtl-4: runKey(virtual-`)
copyColData(curFile,atCursor,buf37,all,1)>
Overlay copied columnar data onto existing text at the cursor
<shftCtl-5: runKey(virtual-`)
copyColData(curFile,atCursor,buf37,all,0)>
Insert the columnar hilite region at the cursor. (No intermediate copy.)
<shftCtl-6: runKey(virtual-`)
copyColData(curFile,atCursor,curFile,hilite,1)>
Overlay the columnar hilite region onto existing text at the cursor
<shftCtl-7: runKey(virtual-`)
copyColData(curFile,atCursor,curFile,hilite,0)>
*** interlace mode ***
Switch to next display mode
<shft-esc: flipFlag(curFile,lace) >
Switch to regular screen, 1 bitplane
<rAmiga-f1: setLocal(curfile, lace, 1) >
Switch to regular screen, 2 bitplanes
<rAmiga-f2: setLocal(curfile, lace, 0) >
Switch to lace screen, 1 bitplane
<rAmiga-f3: setLocal(curfile, lace, 3) >
Switch to lace screen, 2 bitplanes
<rAmiga-f4: setLocal(curfile, lace, 2) >
Tune the RGB colors in interlace using mouse. (See alt-Help also.)
<alt-esc: laceColor>
Toggle scroll type in range 0-2
<rAmiga-s: toggle(scrollType) putMsg(scrollType) >
Toggle hide-display off/on
<rAmiga-h: toggle(hideDisplay) putMsg(hideDisplay) >
Assign a name to one of the 4 gadgets (1-4)
<ctl-esc: putMsg("Enter gadget number (1-4):")
if (not inputNum(n54)) returnFalse
if (gtNum(n54,4)) returnFalse
if (gtNum(1,n54)) returnFalse
putMsg("Enter gadget name (one Space to clear):")
freeBuf(buf54)
inputString(buf54)
if (not isEmpty(buf54)) {
gadgetName(n54,buf54)
putMsg(" ")
} >
Uedit's "About..." shareware message
<shftAltCtl-a:
equateNum(n54,curFile)
freeBuf(buf54)
insertRgn(buf54,sFile,
"
: Uedit :
: Copyright (C) 1986-88, Rick Stiles :
: P.O. Box 666 :
: Washington, IN 47501 :
Uedit is SHAREWARE.
Try it and see how you like it. See Uedit-Policy for ordering information.
",all)
equateLoc(buf54,sPage,sFile)
moveCursor(buf54,eFile)
do (n52,1,50) insertChar(buf54,eLine)
moveCursor(buf54,sFile)
do (n52,1,5) moveCursor(buf54,eLine)
equateLoc(buf54,eHilite,atCursor)
do (n52,1,3) moveCursor(buf54,upLine)
do (n52,1,38) moveCursor(buf54,sChar)
equateLoc(buf54,sHilite,atCursor)
moveCursor(buf54,eFile)
if (getFlag(curFile,columnar)) equateNum(n51,0)
else { flipFlag(curFile,columnar) equateNum(n51,1) }
editBuf(buf54)
vScroll(sFile)
setFileName(buf54," About Uedit...")
updateDisplay
putMsg(" ")
getKey(n53)
editBuf(buf[n54])
.. updateDisplay
putMsg(" ")
if (eqNum(n51,1)) flipFlag(curFile,columnar)
freeBuf(buf54)
>
*****
Assign new Primitive Mode terminator Ctrl-key
<normal-esc: putMsg("Enter new Primitive Mode terminator CTRL-key (pmESC)")
if (getChar(n54))
if (gtNum(32,n54)) equateNum(pmESC,n54)
putMsg(" ") >
Save changed files during idle periods, if their idle-save flag is set
<idle: getMaxFiles(n52)
decNum(n52)
do (n54,0,n52)
if (not inputWaiting)
if (getflag(buf[n54],changed))
if (getflag(buf[n54],userLocalA)) saveFile(buf[n54]) >
*** end of Config!M ***